const getters = {
  device: state => state.app.device,
  theme: state => state.app.theme,
  color: state => state.app.color,
  authId: state => state.user.authId,
  email: state => state.user.email,
  idCard: state => state.user.idCard,
  loginIP: state => state.user.loginIP,
  loginTime: state => state.user.loginTime,
  realName: state => state.user.realName,
  mobile: state => state.user.mobile,
  adminType: state => state.user.adminType,
  role: state => state.user.role,
  token: state => state.user.token,
  userId: state => state.user.userId,
  userName: state => state.user.userName,
  secondOrganizationId: state => state.user.secondOrganizationId,
  secondOrganizationName: state => state.user.secondOrganizationName,
  thirdOrganizationId: state => state.user.thirdOrganizationId,
  thirdOrganizationName: state => state.user.thirdOrganizationName,
  currentOrganizationId: state => state.user.currentOrganizationId,
  currentOrganizationName: state => state.user.currentOrganizationName,
  permissions: state => state.user.permissions,
  userInfo: state => {
    // 在原有的 userInfo 基础上增加一个 nickname 字段
    return {
      ...state.user.info,
      nickName: state.user.realName,
      id: state.user.userId
    }
  },

  avatar: state => state.user.avatar,
  nickname: state => state.user.realName,
  welcome: state => state.user.welcome,
  roles: state => state.user.roles,
  buttons: state => state.user.buttons,
  addRouters: state => state.permission.addRouters,
  multiTab: state => state.app.multiTab,
  lang: state => state.i18n.lang
}

export default getters
